<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>进度条</title>

    <style>
        @keyframes loading {
            from {
                transform: rotateY(-90deg);
            }
            98%,
            to {
                transform: rotateY(0);
            }
        }
        
        * {
            margin: 0;
            padding: 0;
            list-style: none;
        }
        
        .Progress1 {
            position: relative;
            margin: 20px;
            width: 200px;
            height: 30px;
            background-color: #bababa;
        }
        
        .Progress1::before {
            position: absolute;
            top: 0;
            left: 0;
            content: "";
            width: 100%;
            height: 100%;
            background-color: #000;
            transform-origin: left;
            animation: loading 2s infinite;
        }
        
        .Progress2 {
            position: relative;
            margin: 20px;
            width: 200px;
            height: 30px;
            border-radius: 30px;
            background-color: #fff;
        }
        
        .Progress2::before {
            position: absolute;
            top: 0;
            left: 0;
            content: "";
            width: 100%;
            height: 100%;
            border-radius: 30px;
            background: linear-gradient(to right, #ce587d, #83c2db);
            transform-origin: left;
            animation: loading 2s 1s infinite;
        }
        
        .Progress3 {
            position: relative;
            margin: 20px;
            width: 200px;
            height: 30px;
            border-radius: 30px;
            /* border: #000 solid; */
            overflow: hidden;
            background: repeating-linear-gradient(45deg, #d9d9d9, #d9d9d9 20px, #fff 20px, #fff 40px)
        }
        
        .Progress3::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 0;
            height: 100%;
            background: repeating-linear-gradient(45deg, #dd154b, #dd154b 20px, #f59b07 20px, #f59b07 40px);
            animation: loading2 2s .5s infinite;
        }
        /* 4 */
        
        @keyframes loading2 {
            100% {
                width: 120%;
            }
        }
        
        .Progress4 {
            position: relative;
            margin: 20px;
            width: 190px;
            height: 30px;
            /* border: #000 solid; */
            background: repeating-linear-gradient(90deg, #d9d9d9 0px 30px, #fff 0px 40px);
        }
        
        .Progress4::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 0;
            height: 100%;
            background: repeating-linear-gradient(90deg, #000, #000 30px, #fff 0px, #fff 40px);
            animation: loading2 3s infinite steps(6);
        }
    </style>
</head>

<body>
    <div class="Progress1"></div>
    <div class="Progress2"></div>
    <div class="Progress3"></div>
    <div class="Progress4"></div>
</body>

</html>